package fr.afcepf.ai89.esharing.managedbean;

import java.util.Date;
import java.util.List;

import javax.faces.model.SelectItem;

import fr.afcepf.ai89.esharing.entity.Civilite;
import fr.afcepf.ai89.esharing.entity.Complement;
import fr.afcepf.ai89.esharing.entity.FrCodePostalAsso;
import fr.afcepf.ai89.esharing.entity.FrCommune;
import fr.afcepf.ai89.esharing.entity.FrDepartement;
import fr.afcepf.ai89.esharing.entity.FrNoTel;
import fr.afcepf.ai89.esharing.entity.FrRegion;
import fr.afcepf.ai89.esharing.metier.BusinessApprovisionnerCriteres;
import fr.afcepf.ai89.esharing.metier.IBusinessApprovisionnerCriteres;

public class InscriptionParrainageManagedBean {

	private IBusinessApprovisionnerCriteres busApp = new BusinessApprovisionnerCriteres();

	// private List<Civilite> civilites;
	private SelectItem[] civilites;
	private Civilite civ;
	private String nomUtilisateur;
	private String courriel;
	private String mdp;
	private String mdp2;
	private String nom;
	private String prenom;
	private String noVoie;
	// private List<Complement> complements;
	private Complement compl;
	private String nomRue;
	// private List<FrRegion> regions;
	private FrRegion region;
	// private List<FrDepartement> departements;
	private FrDepartement departement;
	// private List<Integer> codePostaux;
	private FrCodePostalAsso codePostal;
	// private List<FrCommune> communes;
	private FrCommune commune;
	private FrNoTel tel1;
	private FrNoTel tel2;
	private Date dateNaissance;
	private String autobiographie;
	private boolean accepte;
	private String captacha;

	// public List<Civilite> getCivilites() {
	//
	// return this.civilites;
	// }
	// public void setCivilites(List<Civilite> civilites) {
	// this.civilites = civilites;
	// }

	public Civilite getCiv() {
		return civ;
	}

	public SelectItem[] getCivilites() {
		if (civilites == null) {
			List<Civilite> list = busApp.getCivilites();
			int i = 1;
			civilites = new SelectItem[list.size() + 1];
			civilites[0] = new SelectItem();
			civilites[0].setValue(-1);
			civilites[0].setLabel("--");
			for (Civilite c : list) {
				civilites[i] = new SelectItem(c);
				civilites[i].setValue(c.getIdCivilite());
				civilites[i].setLabel(c.getCivilite());
				i++;
			}
		}
		return civilites;
	}

	public void setCivilites(SelectItem[] civilites) {
		this.civilites = civilites;
	}

	public void setCiv(Civilite civ) {
		this.civ = civ;
	}

	public String getNomUtilisateur() {
		return nomUtilisateur;
	}

	public void setNomUtilisateur(String nomUtilisateur) {
		this.nomUtilisateur = nomUtilisateur;
	}

	public String getCourriel() {
		return courriel;
	}

	public void setCourriel(String courriel) {
		this.courriel = courriel;
	}

	public String getMdp() {
		return mdp;
	}

	public void setMdp(String mdp) {
		this.mdp = mdp;
	}

	public String getMdp2() {
		return mdp2;
	}

	public void setMdp2(String mdp2) {
		this.mdp2 = mdp2;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public String getPrenom() {
		return prenom;
	}

	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}

	public String getNoVoie() {
		return noVoie;
	}

	public void setNoVoie(String noVoie) {
		this.noVoie = noVoie;
	}

	// public List<Complement> getComplements() {
	// return complements;
	// }
	// public void setComplements(List<Complement> complements) {
	// this.complements = complements;
	// }
	public Complement getCompl() {
		return compl;
	}

	public void setCompl(Complement compl) {
		this.compl = compl;
	}

	public String getNomRue() {
		return nomRue;
	}

	public void setNomRue(String nomRue) {
		this.nomRue = nomRue;
	}

	// public List<FrRegion> getRegions() {
	// return regions;
	// }
	// public void setRegions(List<FrRegion> regions) {
	// this.regions = regions;
	// }
	public FrRegion getRegion() {
		return region;
	}

	public void setRegion(FrRegion region) {
		this.region = region;
	}

	// public List<FrDepartement> getDepartements() {
	// return departements;
	// }
	// public void setDepartements(List<FrDepartement> departements) {
	// this.departements = departements;
	// }
	public FrDepartement getDepartement() {
		return departement;
	}

	public void setDepartement(FrDepartement departement) {
		this.departement = departement;
	}

	// public List<Integer> getCodePostaux() {
	// return codePostaux;
	// }
	//
	// public void setCodePostaux(List<Integer> codePostaux) {
	// this.codePostaux = codePostaux;
	// }

	public FrCodePostalAsso getCodePostal() {
		return codePostal;
	}

	public void setCodePostal(FrCodePostalAsso codePostal) {
		this.codePostal = codePostal;
	}

	// public List<FrCommune> getCommunes() {
	// return communes;
	// }
	// public void setCommunes(List<FrCommune> communes) {
	// this.communes = communes;
	// }
	public FrCommune getCommune() {
		return commune;
	}

	public void setCommune(FrCommune commune) {
		this.commune = commune;
	}

	public FrNoTel getTel1() {
		return tel1;
	}

	public void setTel1(FrNoTel tel1) {
		this.tel1 = tel1;
	}

	public FrNoTel getTel2() {
		return tel2;
	}

	public void setTel2(FrNoTel tel2) {
		this.tel2 = tel2;
	}

	public Date getDateNaissance() {
		return dateNaissance;
	}

	public void setDateNaissance(Date dateNaissance) {
		this.dateNaissance = dateNaissance;
	}

	public String getAutobiographie() {
		return autobiographie;
	}

	public void setAutobiographie(String autobiographie) {
		this.autobiographie = autobiographie;
	}

	public boolean isAccepte() {
		return accepte;
	}

	public void setAccepte(boolean accepte) {
		this.accepte = accepte;
	}

	public String getCaptacha() {
		return captacha;
	}

	public void setCaptacha(String captacha) {
		this.captacha = captacha;
	}

	public String inscrire() {
		return "";
	}

}
